class GetAndSet {
    constructor(v) {
        this.v = v;
    }

    get current() {
        return this.v;
    }

    set current(v1) {
        this.v = v1;
    }
}

const getAndSet = new GetAndSet(1);
console.log(getAndSet.current)

getAndSet.current = 2;

console.log(getAndSet.current)